package com.ruitu.mall_98.base;

import com.baidu.mapapi.SDKInitializer;
import com.beanu.arad.AradApplication;
import com.beanu.arad.AradApplicationConfig;
import com.ruitu.router_module.bean.map_location.LocationService;

import cn.jiguang.share.android.api.JShareInterface;
import cn.jiguang.share.android.api.PlatformConfig;
import cn.jpush.android.api.JPushInterface;
import io.rong.imkit.RongIM;

/**
 * Created by Administrator on 2018.08.01.
 */

public class MyApp extends AradApplication {
    public LocationService locationService;//封装的百度定位服务

    @Override
    protected AradApplicationConfig appConfig() {
        return new AradApplicationConfig();
    }

    @Override
    public void onCreate() {
        super.onCreate();

        JPushInterface.setDebugMode(true);
        JPushInterface.init(this);//极光推送初始化
        JPushInterface.setSilenceTime(getApplicationContext(), 0, 0, 23, 59);

        JShareInterface.setDebugMode(true);//极光分享
        PlatformConfig platformConfig = new PlatformConfig()
                .setWechat("wxae66509b894c60cf", "62363a2f0d9f9e140d7552deb42057a9")
                .setQQ("101546876", "2250cf52dfd5f4a2dfb27b2617dc1544");
        JShareInterface.init(this, platformConfig);//极光分享初始化

        RongIM.init(this);

        SDKInitializer.initialize(getApplicationContext());//百度地图定位初始化
        locationService = new LocationService(getApplicationContext());
    }
}
